package com.jnxx.task.taskRemind;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
@Slf4j
@Component
public class startupClass {

    @Autowired
    private MessageConsumer messageConsumer;

    @PostConstruct
    public void init() {
        // 在应用启动时调用 consumer 方法
        log.info("开启redis延迟队列");
        messageConsumer.consumer();
    }
}